<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery-1.4.2.js"></script>
    <script>
        setTimeout(function () {
            //  模拟按钮的点击事件             元素.trigger("事件名称")
            $("input").trigger("click")
        },3000);


        $(function(){
            $("div").hover(function(){
                $(this).css("color","red");
                },function () {
                    $(this).css("color","green");
            });
        });
    </script>
</head>
<body>
 <input type="button" value="按钮"
        onclick="alert('按钮点击了')">
<div>div1</div>
 <div>div2</div>
 <div>div3</div>

</body>
</html>